/***
 * Copyright (c) 2021-2031 murenchao
 * fig is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *       http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package cool.taomu.software.fig.asm.aspect2

import java.lang.reflect.Method
import org.eclipse.xtend.lib.annotations.Accessors

@Accessors
class AspectHandle {
    //被切入的对象实例
    Object instance;
    //被切入的方法实参
    Object[] arguments;
    //被切入的方法
    Method method;

    def String getMethodName() {
        return this.method.name
    }
    def Class<?> getReturnType(){
        return this.method.returnType;
    }

    def Object invoke() {
        this.method.invoke(instance, arguments);
    }
}
